﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>TestHtml</title>
    <script src="~/Scripts/jquery-3.3.1.js"></script>
    <script src="~/Third/select2.js"></script>
    <link href="~/Third/select2.css" rel="stylesheet" />
</head>
<body>
    <div>
        @*@Html.DropDownList("SerialName", ViewBag.selList1 as IEnumerable<SelectListItem>, new { @class = "form-control" })*@
    </div>

    @*<!--只可搜索的select-->
        <select class="js-example-placeholder-multiple-two js-states form-control" multiple="multiple" style="display: none;">
            <!--multiple="multiple"可以多值选择-->
            @Html.DropDownList("selList1")
        </select>*@

    <!--只可搜索的select-->
    <select id="test" class="js-example-placeholder-multiple-two js-states form-control"  style="display: none;width:300px;">
        <!--multiple="multiple"可以多值选择-->
        <option value=""> </option>
        <option value="北京蜂">北京蜂</option>
        <option value="北京">北京</option>
        <option value="小章额为氛围分为">小章额为氛围分为</option>
        <option value="entertainment">entertainment32323232</option>
        <option value="and">and23323232</option>
    </select>


    <script>
        var data = [{ id: 0, text: 'enhancement' }, { id: 1, text: 'bug' }, { id: 2, text: 'duplicate' }, { id: 3, text: 'invalid' }, { id: 4, text: 'wontfix' }];
        $("#test").select2({
            data: data,
            placeholder: '邮寄方式...',
            tags: true,
            allowClear: true
        })
    </script>
</body>
</html>
